/*************************************************************************
	> File Name: oj-145_longest_name.c
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2020年10月19日 星期一 20时05分54秒
 ************************************************************************/

#include <stdio.h>
#include <string.h>

int main() {
    int n;
    size_t len = 0, maxlen = 0;
    char buf[100] = {0}, name[100] = {0};
    scanf("%d", &n);
    for (int i = 0; i <n; ++i) {
        scanf("%s", buf);
        len = strlen(buf);
        if (len > maxlen) {
            maxlen = len;
            strcpy(name, buf);
        }
    }
    printf("%s", name);
    return 0;
}
